package cn.wolfcode.crm.query;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter
@Setter
public class FollowStudentQueryObject extends QueryForObject {

    private String keyword = null;

    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date followTimeBegin;

    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date followTimeEnd;
    private Long followPerson = 0L;
    private Long state = 0L;

    public String getKeyword() {
        return keyword == null || "".equals(keyword.trim()) ? null : keyword;
    }

    public Long getState() {
        return state > 0 ? state : 0;
    }

    public Long getFollowPerson() {
        return followPerson > 0 ? followPerson : 0;
    }

}
